import request from '@/utils/request'
import { websock } from '@/websock'

// 部门列表
export function getDepartmentList(params) {
  return websock.getDepartList()
}

// 添加部门
export function addDepartment(data) {
  return request({
    url: '/admin/addDepartment',
    method: 'post',
    data
  })
}

// 删除部门
export function delDepart(data) {
  return request({
    url: '/admin/delDepartment',
    method: 'post',
    data
  })
}

// 更新员工排序
export function updateDepartmentSort(data) {
  return request({
    url: '/admin/updateDepartmentSort',
    method: 'post',
    data
  })
}
